﻿@model IEnumerable<tutors_clus.Models.teacher>

@{
    ViewBag.Title = "Kết quả tìm kiếm giáo viên";
    Layout = "~/Views/Shared/_Layout_Private.cshtml";
}
<div id="cleft">@Html.Partial("_menu_admin")</div>
<div id="cright">
@{Html.RenderAction("Search_teacher", "Admin");}
@if (ViewBag.count <= 0)
{
    <div>Không có kết quả tìm kiếm nào cho: <b>@ViewBag.search</b></div>
}
else
{
    <div>Có "@ViewBag.count" kết quả cho: <b>@ViewBag.search</b></div>
   <table>
    <tr>
        <th>
            @Html.DisplayNameFor(model => model.fullname_tea)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.birthday_tea)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.address_tea)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.registered_tea)
        </th>
        <th>
            Các lớp đã tham gia
        </th>
        <th></th>
    </tr>

@foreach (var item in Model) {
    <tr>
        <td>
            @Html.DisplayFor(modelItem => item.fullname_tea)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.birthday_tea)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.address_tea)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.registered_tea)
        </td>
        <td>
            @foreach (var item1 in item.courses)
            {
                <div>@item1.name_cou</div>
            }
        </td>
    </tr>
}

</table>
}
@Html.ActionLink("Trở về", "List_teacher")
</div>